package com.javaee.ch10.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/")
public class Router {
    @GetMapping("/book/list")
    public String toBook() {
        return "/book/book-list";
    }

    @GetMapping("/file/comp")
    public String toComponent() {
        return "/component-demo/file-comp-ex";
    }

    @GetMapping("/parent-comp")
    public String toParentComponent() {
        return "/component-demo/ParentComponent";
    }

    @GetMapping("/myaxios")
    public String toAxios( ) {
        return "/component-demo/axiosInstance-ex1";
    }

    @GetMapping("/simple-fileupload")
    public String simpleFileUpload( ) {
        return "/fileupload/simple-fileupload";
    }

    @GetMapping("/login")
    public String login( ) {
        return "/login";
    }

    @GetMapping("/reader/list")
    public String toReaderList() {
        return "/reader/reader-list";
    }

    @GetMapping("/noPermission")
    public String toPermission() {
        return "/unauthorized";
    }

}